package com.ruoyi.module.studyCenterDetail.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.module.studyCenterDetail.mapper.StudyCenterDetailMapper;
import com.ruoyi.module.studyCenterDetail.domain.StudyCenterDetail;
import com.ruoyi.module.studyCenterDetail.service.IStudyCenterDetailService;

/**
 * 学习中心详情Service业务层处理
 * 
 * @author yqq
 * @date 2024-04-19
 */
@Service
public class StudyCenterDetailServiceImpl implements IStudyCenterDetailService 
{
    @Autowired
    private StudyCenterDetailMapper studyCenterDetailMapper;

    /**
     * 查询学习中心详情
     * 
     * @param detailId 学习中心详情主键
     * @return 学习中心详情
     */
    @Override
    public StudyCenterDetail selectStudyCenterDetailByDetailId(Long detailId)
    {
        return studyCenterDetailMapper.selectStudyCenterDetailByDetailId(detailId);
    }

    /**
     * 查询学习中心详情列表
     * 
     * @param studyCenterDetail 学习中心详情
     * @return 学习中心详情
     */
    @Override
    public List<StudyCenterDetail> selectStudyCenterDetailList(StudyCenterDetail studyCenterDetail)
    {
        return studyCenterDetailMapper.selectStudyCenterDetailList(studyCenterDetail);
    }

    /**
     * 新增学习中心详情
     * 
     * @param studyCenterDetail 学习中心详情
     * @return 结果
     */
    @Override
    public int insertStudyCenterDetail(StudyCenterDetail studyCenterDetail)
    {
        studyCenterDetail.setCreateTime(DateUtils.getNowDate());
        return studyCenterDetailMapper.insertStudyCenterDetail(studyCenterDetail);
    }

    /**
     * 修改学习中心详情
     * 
     * @param studyCenterDetail 学习中心详情
     * @return 结果
     */
    @Override
    public int updateStudyCenterDetail(StudyCenterDetail studyCenterDetail)
    {
        studyCenterDetail.setUpdateTime(DateUtils.getNowDate());
        return studyCenterDetailMapper.updateStudyCenterDetail(studyCenterDetail);
    }

    /**
     * 批量删除学习中心详情
     * 
     * @param detailIds 需要删除的学习中心详情主键
     * @return 结果
     */
    @Override
    public int deleteStudyCenterDetailByDetailIds(Long[] detailIds)
    {
        return studyCenterDetailMapper.deleteStudyCenterDetailByDetailIds(detailIds);
    }

    /**
     * 删除学习中心详情信息
     * 
     * @param detailId 学习中心详情主键
     * @return 结果
     */
    @Override
    public int deleteStudyCenterDetailByDetailId(Long detailId)
    {
        return studyCenterDetailMapper.deleteStudyCenterDetailByDetailId(detailId);
    }
}
